<#assign tit><#if tp?? && tp='1'>私教日程安排<#else>私教核销</#if></#assign>
<@page.html title=tit>
<script type="text/javascript" src="${_appPath!}/js/cal.js"></script>
<script>
  function selAll(b) {
    var cbs = document.getElementsByName("cbids");
    if(cbs) {
      for(var i=0; i<cbs.length; i++)
        cbs[i].checked = b;
    }
  }
  function clearSel() {
    var arr = [];
    var cbs = document.getElementsByName("cbids");
    if(cbs) {
      for(var i=0; i<cbs.length; i++)
        if(cbs[i].checked) arr.push(cbs[i].value);
    }
    if(arr.length==0) {
      window.alert("请先选择");
      return;
    }
    oper('_clear?id='+arr.join(","));
  }
</script>
  <div class="search">
    <form id="fm_query" action="_list">
      <input type="hidden" name="tp" value="${tp!}">
      <dl>
        <dt>门店</dt>
        <dd><script>shopsel('shopCode');</script></dd>
        <dt>日期</dt>
        <dd><input type="text" class="date" name="dateFrom" value="" onfocus="cal(this);" />
          ~ <input type="text" class="date" name="dateTo" value="" onfocus="cal(this);" /></dd>
      </dl>
      <dl>
        <dt>教练工号</dt>
        <dd><input type="text" name="coachCode" value="" size="16" /></dd>
        <dt>会员卡号</dt>
        <dd><input type="text" name="cardCode" value="" size="16" /></dd>
        <dd class="button"><input type="button" value="查询" onclick="query();"></dd>
        <#if !tp?? || tp!='1'><dd class="oper"><#if canClear??><a class="add" href="javascript:clearSel();">核销选中记录</a></#if></dd></#if>
      </dl>
    </form>
  </div>
  <div id="div_list"></div>
<script type="text/javascript">query();</script>
</@page.html>